Optimal. Leaf size=19 \[ \frac {x}{a}+\frac {\cos (c+d x)}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2761, 8}
\begin {gather*} \frac {\cos (c+d x)}{a d}+\frac {x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2761
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\cos (c+d x)}{a d}+\frac {\int 1 \, dx}{a}\\ &=\frac {x}{a}+\frac {\cos (c+d x)}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(97\) vs. \(2(19)=38\).
time = 0.08, size = 97, normalized size = 5.11 \begin {gather*} -\frac {\cos ^3(c+d x) \left (2 \sin ^{-1}\left (\frac {\sqrt {1-\sin (c+d x)}}{\sqrt {2}}\right ) \sqrt {1-\sin (c+d x)}+(-1+\sin (c+d x)) \sqrt {1+\sin (c+d x)}\right )}{a d (-1+\sin (c+d x))^2 (1+\sin (c+d x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 35, normalized size = 1.84
method | result | size |
risch | \(\frac {x}{a}+\frac {\cos \left (d x +c \right )}{a d}\) | \(20\) |
derivativedivides | \(\frac {\frac {2}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(35\) |
default | \(\frac {\frac {2}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(35\) |
norman | \(\frac {\frac {x}{a}+\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}+\frac {x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2}{a d}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}+\frac {2 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}+\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) | \(179\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 52 vs.
\(2 (19) = 38\).
time = 0.56, size = 52, normalized size = 2.74 \begin {gather*} \frac {2 \, {\left (\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 17, normalized size = 0.89 \begin {gather*} \frac {d x + \cos \left (d x + c\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 88 vs.
\(2 (12) = 24\).
time = 1.25, size = 88, normalized size = 4.63 \begin {gather*} \begin {cases} \frac {d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} + \frac {d x}{a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} + \frac {2}{a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} & \text {for}\: d \neq 0 \\\frac {x \cos ^{2}{\left (c \right )}}{a \sin {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.70, size = 34, normalized size = 1.79 \begin {gather*} \frac {\frac {d x + c}{a} + \frac {2}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.53, size = 29, normalized size = 1.53 \begin {gather*} \frac {x}{a}+\frac {2}{a\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________